<?php
/* @var $this SiteController */
Yii::import('ext.jquery-gmap.*');
$this->pageTitle=Yii::app()->name;
?>
<div class="span-6 " style="text-align: center">
    <h5> Bienvenido al sistema de localizaci&oacute;n <br/>
    CODEM &amp; COSESA</h5>
</div>
<div class="span-17 last ">
    <div class="span-17 last">
        <?php
        $gmap = new EGmap3Widget();
        $gmap->setSize(669, 400);
        
        $options = array(
            'scaleControl' => true,
            'streetViewControl' => FALSE,
            'zoom' => 6,
            'center' => array(19.414792, -99.100113),
            'mapTypeId' => EGmap3MapTypeId::ROADMAP,
            'mapTypeControlOptions' => array(
                    'style' => EGmap3MapTypeControlStyle::DROPDOWN_MENU,
                    'position' => EGmap3ControlPosition::TOP_CENTER,
            ),
            'zoomControlOptions' => array(
                    'style' => EGmap3ZoomControlStyle::SMALL,
                    'position' => EGmap3ControlPosition::BOTTOM_CENTER
            ),
        );
        
        foreach ($coord_flota as $coord)
        {
            $markerOptions = new EGmap3MarkerOptions();
            $markerOptions->title = GPSHelper::etiquetaEquipo($coord->equipo_id, $coord->hora);
            $markerOptions->icon = $coord->imagen;
            
            $marker = new EGmap3Marker();
            $marker->latLng = array($coord->latitud, $coord->longitud);
            $marker->setOptions($markerOptions);
            $gmap->add($marker);
        }
        $gmap->setOptions($options);
        $gmap->renderMap();
        
        ?>
    </div>
    <div class="span-17 last">
        <!-- foo -->
    </div>
</div>
